<extend name="template/base_index" />

<block name="area_header">
	<link rel="stylesheet" type="text/css" media="all" href="__CDN__/jquery-datetimepicker/jquery.datetimepicker.css">
	<script type="text/javascript" src="__CDN__/jquery-datetimepicker/jquery.datetimepicker.js"></script>

</block>

<block name="area_body">
	{:W('Menus/topbar')}
	<div class="admin-main container-fluid">
		{:W('Menus/left')}
		<div class="admin-main-content">
			{:W('Menus/breadcrumb')}
			<div class="table-responsive well">
				
				<div class="filter-controls">
					<!--<a href="{:U('Admin/Wxuser/syncUser')}" class="btn btn-sm btn-primary"><i class="fa fa-refresh"></i>同步公众号会员</a>-->
				</div>
				<!--,array('startdatetime'=>I('get.startdatetime',''),'enddatetime'=>I('get.enddatetime',''))-->
				<!-- 过滤\查询按钮 -->
				<div class="filter-controls">
					<!-- 日期查询 -->
					<form action="{:U('Admin/Wxuser/index')}" method="post" class="form-inline">
						<div class="form-group">
							<div class="input-group">
								
								<div class="input-group-addon">
									用户昵称
									<i class="fa fa-user"></i>
								</div>
								<input type="text" name="nickname" class="form-control" value="{$nickname}" />
							</div>
						</div>
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									关注时间
									<i class="fa fa-calendar"></i>
								</div>
								<input type="text" name="startdatetime" id="startdatetime" class="form-control input-short" value="{:date('Y-m-d',$startdatetime)}" />
								<div class="input-group-addon">
									<i class="fa fa-long-arrow-right"></i>
								</div>
								<input type="text" name="enddatetime" id="enddatetime" class="form-control input-short" value="{:date('Y-m-d',$enddatetime)}" />
							</div>
						</div>
						<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search"></i>{:L('BTN_SEARCH')}</button>
					</form>
				</div>
				<!-- 操作按钮 -->
				<div class="btn-controls">
					<!--<a class="btn btn-primary" href="{:U('Admin/Wxfans/add')}">{:L('BTN_ADD')}</a>-->
					<!--<a class="btn btn-primary" href="{:U('Admin/Wxfans/disable')}">{:L('BTN_ENABLE')}</a>
					<a class="btn btn-primary" href="{:U('Admin/Wxfans/enable')}">{:L('BTN_DISABLE')}</a>-->
				</div>

				<table class="table table-striped table table-hover  table-condensed">
					<thead>
						<tr>
							<th>
								<input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />昵称
							</th>
							<th>
								头像
							</th>
							<th>
								积分
							</th>
							<th>
								关注时间
							</th>
							<!--<th>
								{:L('STATUS')}
							</th>-->
							<th>
								{:L('OPERATOR')}
							</th>
						</tr>
					</thead>
					<tbody>
						<empty name="list">
							<tr>
								<td colspan="5" class="text-center">{:L('NO_DATA')}</td>
							</tr>
							<else/>
							<volist name="list" id="vo">
								<tr>
									<td>
										<input type="checkbox" value="{$vo.id}" name="ids[]" class="selectitem" /><a href="{:U(CONTROLLER_NAME .'/view',array('id'=>$vo['id']))}" >{$vo.nickname}</a></td>
									<td><img src="{$vo.avatar}" class="avatar" style="max-width:60px;"/> </td>
									<td>
										{$vo.score}
									</td>
									<td>
										{$vo.subscribe_time|date='Y-m-d h:i:s',###}
									</td>
									<!--<td>{$vo.status|getStatus}</td>-->
									<td>
										<a href="{:U('Admin/Wxuser/sendText',array('id'=>$vo['id']))}" class="btn btn-default btn-sm"><i class="fa fa-send"></i>给他发送微信消息</a>
									
										<a href="{:U('Admin/Wxuser/viewFamily',array('id'=>$vo['id']))}" class="btn btn-default btn-sm"><i class="fa fa-eye"></i>查看其家族</a>
									</td>
								</tr>

							</volist>
						</empty>
					</tbody>
				</table>
				<div>{$show}</div>
			</div>

			<script type="text/javascript">
				$(function() {
						$('#startdatetime').datetimepicker({
							lang: 'ch',
							format:'Y-m-d',
							timepicker:false,
						});
						$('#enddatetime').datetimepicker({
							lang: 'ch',
							format:'Y-m-d',
							timepicker:false,
						});
				});
			</script>

		</div>
		<!-- END admin-main-content -->
	</div>
	<!-- END admin-main-->
</block>

<block name="area_footer">

</block>